﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace webapi_demo.User
{
    public class UserContext
    {
        public static List<string> AllowAnonymousPathList;
        /// <summary>
        /// 基本原理是从数据库或者缓存中获取当前用户对应的权限列表，也就是url列表，进行对比
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public bool Authorize(PathString url)
        {
            return true;
        }

        public  bool IsAllowAnonymous(PathString url)
        {
            return true;
        }
    }
}
